from django.urls import path, include
from django.conf.urls.static import static
from django.conf import settings
from apps.articles import views

urlpatterns = [
    path('', views.index, name='index'),
    path('search/', views.search, name='search'),
    path('article/', include('apps.articles.urls')),
    path('cms/', include('apps.cms.urls')),
    path('account/', include('apps.ynauth.urls')),
    path('video/', include('apps.video.urls')),
    path('images/', include('apps.images.urls')),
    path('ueditor/', include('apps.ueditor.urls'))
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

if settings.DEBUG:
    import debug_toolbar
    urlpatterns.append(path('__debug__/', include(debug_toolbar.urls)))
